package com.wtoip.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wtoip.core.vo.Result;
import com.wtoip.domain.UserVO;
import com.wtoip.service.UserService;

@Controller
@RequestMapping("user")
public class UserController {
	
	@Autowired
	private UserService userService;
	
	@ResponseBody
	@RequestMapping("getById")
	public Result getUserById(Integer userId) {
		Result result = new Result();
		
		UserVO userVO = userService.getUserById(1);
		result.setData(userVO);
		
		return result;
	}
	
}
